Get Template
Get Template Details
An API is exposed using which the business/IT system can fetch the WA template information for their respective account. The WA template details includes- information with respect to Header, Body, Footer, Component Details, Name, Language, Status and Template category.
Authorization Mechanism - Token based authentication mechanism will be used for authorizing user to fetch the template details. Please check 'Getting Started - Before You Start' section for details.
Fetch template API Details
- API endpoint: https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates
- Request Type: GET
Sample curl Request
curl --location 'https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates'\{TemplateName}
--header 'Authorization: Bearer XXXXX
--header 'Content-Type: application/json' \
Header Values
Attribute | Description |
---|---|
Authorization | Bearer token. |
Content-type | Fixed value- application/json. |
Data Object values
Attribute | Description |
---|---|
waBusinessAccountId | Business Account ID. |
lanCode | The template language whose details need to be fetched. |
templateName | Template whose details need to be fetched-(Template name is case sensitive). |
Sample Response
Payload
{
"name": "xxxxx",
"components": [
{
"type": "BODY",
"text": "This message is to confirm your {{1}} for {{2}} from {{3}} on {{4}}.",
"example": {
"body_text": [
[
"purchase",
"$12.34",
"CS Mutual",
"Jan 1, 2024"
]
]
}
}
],
"language": "en_US",
"status": "APPROVED",
"category": "UTILITY",
"sub_category": "FRAUD_ALERT",
"library_template_name": "purchase_transaction_alert",
"id": "xxxxxxx"
},
Fetch Bulk template API Details
- API endpoint: 'https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates'
- Request Type: GET
Sample curl Request
curl --location 'https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates'
--header 'Authorization: Bearer XXXXX
--header 'Content-Type: application/json' \
Sample Response
Payload
{
"name": "xxxxx",
"components": [
{
"type": "BODY",
"text": "This message is to confirm your {{1}} for {{2}} from {{3}} on {{4}}.",
"example": {
"body_text": [
[
"purchase",
"$12.34",
"CS Mutual",
"Jan 1, 2024"
]
]
}
}
],
"language": "en_US",
"status": "APPROVED",
"category": "UTILITY",
"sub_category": "FRAUD_ALERT",
"library_template_name": "purchase_transaction_alert",
"id": "xxxxxxx"
}
{
"name": "xxxxx",
"components": [
{
"type": "BODY",
"text": "This message is to confirm your {{1}} for {{2}} from {{3}} on {{4}}.",
"example": {
"body_text": [
[
"purchase",
"$11.84",
"CS Mutual",
"Jan 6, 2024"
]
]
}.....................